package org.hales.config;

import org.hales.service.DownLoadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.Scanner;

/**
 * @author 陈建康
 */
@Component
public class StartRunner implements CommandLineRunner {

    private final DownLoadService myService;

    @Autowired
    public StartRunner(DownLoadService myService) {
        this.myService = myService;
    }

    @Override
    public void run(String... args) throws Exception {
//        myService.collectPollutantFileNames();
    }

    // 注意类名必须为 Main, 不要有任何 package xxx 信息
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            // 注意 hasNext 和 hasNextLine 的区别
            double a = in.nextDouble();
            double sum = Math.pow(a,3);
            int a1 = (int)((sum /a) + 1 -a) ;
            int sumLeft = (int)sum;
            double sumRight = 0;
            StringBuilder sb = new StringBuilder();
            while(sumRight != sumLeft){
               if(sb.length() == 0){
                   sb.append(a1);
                   sumRight += a1;
               }
               else{
                   a1+=2;
                   sb.append("+").append(a1);
                   sumRight += (a1);
               }
           }
            System.out.println(sb.toString());
        }
}